/*
 * Astar.h
 *
 *  Created on: Oct 22, 2010
 *      Author: sanjeev
 */
#include <constants.h>
#include <library.h>

#ifndef ASTAR_H_
#define ASTAR_H_

class Astar {
	public:
		Astar();
		virtual ~Astar();
		MATRIX navfn;
		bool computePath(MATRIX &grid, MATRIX &obs, PII &st, PII &gl);
	private:
		PII goal, start;
		int w, h;
		double alpha;

		void clear();
		double get_heuristic(int x, int y);
		void make_matrix(int height, int width);
		double update_cost(int x, int y, double c );
		void push_neighbors(PRQ &pq, PII &state, MATRIX &grid, MATRIX &obs );
		double calc_navfn(int x,int y,double obs);
};

#endif /* ASTAR_H_ */
